<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "innner_link".
 *
 * @property int $id
 * @property string $word 关键词
 * @property string $name 链接地址
 */
class InnnerLink extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'innner_link';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ['word', 'unique'],
            [['word', 'name'], 'required'],
            [['word', 'name'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'word' => Yii::t('app', '关键词'),
            'name' => Yii::t('app', '链接地址'),
        ];
    }
}
